<%@page import="java.util.Date"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>response设置自动刷新</title>
</head>
<body>
<!-- 
使用response.setHeader("refresh","1");
浏览器访问这个页面后，会每隔1s自动刷新一次
 -->
<%
	//每隔1s刷新一次页面
	response.setHeader("refresh","1");
	//获取当前电脑的系统时间
	Date myDate = new Date();

%>
<font size="3" color="blue" face="楷体">当前电脑时间：<%=myDate %></font><br>
</body>
</html>